package org.dev.vlp.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName vlp_learn_record
 */
@TableName(value ="vlp_learn_record")
@Data
public class LearnRecord implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer learnRecordId;

    /**
     * 
     */
    private Integer wordId;

    /**
     * 
     */
    private Integer userId;

    /**
     * 
     */
    private Date gmtCreate;

    /**
     * 
     */
    private Date nextMemoryTime;

    /**
     * 
     */
    private Integer phase;

    /**
     * 
     */
    private Integer lanId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        LearnRecord other = (LearnRecord) that;
        return (this.getLearnRecordId() == null ? other.getLearnRecordId() == null : this.getLearnRecordId().equals(other.getLearnRecordId()))
            && (this.getWordId() == null ? other.getWordId() == null : this.getWordId().equals(other.getWordId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getGmtCreate() == null ? other.getGmtCreate() == null : this.getGmtCreate().equals(other.getGmtCreate()))
            && (this.getNextMemoryTime() == null ? other.getNextMemoryTime() == null : this.getNextMemoryTime().equals(other.getNextMemoryTime()))
            && (this.getPhase() == null ? other.getPhase() == null : this.getPhase().equals(other.getPhase()))
            && (this.getLanId() == null ? other.getLanId() == null : this.getLanId().equals(other.getLanId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getLearnRecordId() == null) ? 0 : getLearnRecordId().hashCode());
        result = prime * result + ((getWordId() == null) ? 0 : getWordId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getGmtCreate() == null) ? 0 : getGmtCreate().hashCode());
        result = prime * result + ((getNextMemoryTime() == null) ? 0 : getNextMemoryTime().hashCode());
        result = prime * result + ((getPhase() == null) ? 0 : getPhase().hashCode());
        result = prime * result + ((getLanId() == null) ? 0 : getLanId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", learnRecordId=").append(learnRecordId);
        sb.append(", wordId=").append(wordId);
        sb.append(", userId=").append(userId);
        sb.append(", gmtCreate=").append(gmtCreate);
        sb.append(", nextMemoryTime=").append(nextMemoryTime);
        sb.append(", phase=").append(phase);
        sb.append(", lanId=").append(lanId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}